import { ENUM_VOUCHER, NumberTransOption } from "qqlx-core";

export const MAP_ENUM_VOUCHER = new Map<ENUM_VOUCHER, NumberTransOption>();

MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.NONE, { value: ENUM_VOUCHER.NONE, zh: "无" });
MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.INCOME_HUOKUAN, { value: ENUM_VOUCHER.INCOME_HUOKUAN, zh: "收到货款" });
MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.INCOME_TUIKUAN, { value: ENUM_VOUCHER.INCOME_TUIKUAN, zh: "退货款" });
MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.INCOME_FAPIAO, { value: ENUM_VOUCHER.INCOME_FAPIAO, zh: "开出发票" });
MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.EXPENSE_HUOKUAN, { value: ENUM_VOUCHER.EXPENSE_HUOKUAN, zh: "实付货款" });
MAP_ENUM_VOUCHER.set(ENUM_VOUCHER.EXPENSE_FAPIAO, { value: ENUM_VOUCHER.EXPENSE_FAPIAO, zh: "收到发票" });

export const getVoucherTrans = function (code: ENUM_VOUCHER) {
  return MAP_ENUM_VOUCHER.get(code);
};
